package thread.basepackage.t9;

/**
 * Created by cuihao on 2017/11/29.
 */
public class RunTest {
    public static void main(String[] args) {
        final MyObject object = new MyObject();
        try {
            Thread thread = new Thread() {
                @Override
                public void run() {

                    object.setVlaue("a", "aa");
                }
            };
            thread.setName("a");
            thread.start();
            Thread.sleep(400);

            Thread thread1 = new Thread() {
                @Override
                public void run() {
                    object.print();
                }
            };
            thread1.start();

        } catch (InterruptedException e) {
            e.printStackTrace();
        }


    }
}
